// pages/orderdetail/orderdetail.js
const app = getApp()
Page({
  currentData: 0,
  data: {
    currentData: 0,
  },

  onLoad: function (options) {
    this.getdel(options.oid, options.uvid)
  },
  getdel(oid, uvid) {  //订单列表
    let that = this;
    wx.request({   //传后台
      url: app.globalData.url + '/jxb/order/getOrderInfo',
      method: 'GET',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: {
        oid: oid,
        token: wx.getStorageSync('token'),
        uvid: uvid,
      },
      success: function (res) {
        that.setData({
          listdel: res.data.data.orderInfo
        })

      },

    })
  },
  copyText(e) {
    wx.setClipboardData({
      data: e.currentTarget.dataset.text,
      success: function (res) {
        wx.getClipboardData({
          success: function (res) {
            wx.showToast({
              title: '复制成功'
            })
          }
        })
      }
    })
  },
  seeview(e) {//预览图片
    let pidiurl = e.currentTarget.dataset.pidiurl
    wx.previewImage({
      urls: [pidiurl],
    })
  },


})